/****** Object:  Table [dbo].[userpreference]    Script Date: 03/17/2012 20:56:45 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[userpreference]') AND type in (N'U'))
DROP TABLE [dbo].[userpreference]
GO



CREATE TABLE [dbo].[userpreference](
	[id] [int] NOT NULL identity(1,1) primary key,
	[aaid] [int] NULL,
	[cnid] [int] NULL,
	[aadateid] [int] NULL,
	[cndateid] [int]
) ON [PRIMARY]

GO

alter table userinfo add preferenceid int;
GO

alter table userinfo ADD  CONSTRAINT [fkprefid] FOREIGN KEY([preferenceid])
REFERENCES [dbo].[userpreference] ([id])

